.


:




:

































 

 

 

 


RUBY




 

 

 

, . , . , . - Ruby.

:

-

:

Ruby

Haml

Sass

Ruby,Haml Sass, -

 

.

- -, [1].

:

, ;

. , , , - );

. , , .

, .

. , - , . , .

, , , , . - , , . - .

. , .

(.1.)

.1.

 

, . 1949 .

, , . :

() . , . , , .. , .

. , . 0,06-0,07.

, , , .

. , , . .

. . , , . . . [2]

: , , .

()

(

( )

( )

:

׸ ( iPad 2)

(, )

:

( )

( )

( )

( masterhost)

 

RUBY

Ruby , , - . , , . Ruby Perl Eiffel, - Smalltalk. Python, Lisp, Dylan . Ruby (Unix, Win32, OS X). .

Ruby - . , [3].

Ruby:

:

.

( ).

.

.

:

.

.

.

.

- :

. Class.

, , , , .

-.

( );

.

.

:

.

.

, .

.

.

; , UNIX.

:

(, ), ;

;

[4].

, Ruby () ( , , , , 3D .). .

 

1.3. HAML

Haml - XHTML. HAML HTML. Haml Html'` , -.

, Haml'

!!!

%html{ html_attrs('ru') }

%head

%title

%meta(http-equiv="Content-Type" content="text/html; charset=utf-8")

= stylesheet_link_tag "main"

%body

#header

%h1

%h2

#content

- @entries.each do |entry|

.entry

%h3.title= entry.title

%p.date= entry.posted.strftime("%A, %B %d, %Y")

%p.body= entry.body

#footer

%p.copyright

Html-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html lang='ru' xml:lang='ru' xmlns='http://www.w3.org/1999/xhtml'>

<head>

<title> </title>

<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />

<link href="/stylesheets/main.css?" media="screen" rel="Stylesheet" type="text/css" />

</head>

<body>

<div id='header'>

<h1> </h1>

<h2></h2>

</div>

<div id='content'>

<div class='entry'>

<h3 class='title'></h3>

<p class='date'>, 31 , 2006</p>

<p class='body'>

.

</p>

</div>

<div class='entry'>

<h3 class='title'> Rails</h3>

<p class='date'>, 11 , 2006</p>

<p class='body'>

Haml . Rails- . ?

</p>

</div>

</div>

<div id='footer'>

<p class='copyright'>

???

</p>

</div>

</body>

</html>

[5]

, 19 35.

Haml' .

SASS

Sass CSS, CSS .

Sass :

sass , ;

SCSS (Sassy CSS) , CSS.

#header

background: #FFFFFF

.error

color: #FF0000

, a

text-decoration: none

&:hover

text-decoration: underline

#header {

background: #FFFFFF;

}

#header.error {

color: #FF0000;

}

#header a {

text-decoration: none

}

#header a:hover {

text-decoration: underline

}

[6]

Saas Haml Css Html. Sass Css , (Haml) . Less, , Sass Haml Ruby, Sass Haml.





:


: 2015-11-05; !; : 874 |


:

:

! . .
==> ...

1660 - | 1447 -


© 2015-2024 lektsii.org - -

: 0.038 .